1. Field of the Invention
The present invention relates to an image interpolating device provided in a digital camera, for example, to improve color image quality.
2. Description of the Related Art
Conventionally, there is known a digital camera in which a color filter of the Bayer arrangement is provided on a light receiving surface of an imaging device such as a CCD so as to sense a color image. The color filter is formed by arranging red(R), green(G), and blue(B) color filter elements in a checkerboard arrangement, and the color filter elements correspond to photodiodes of the imaging device. Therefore, a pixel signal of a color, which corresponds to each of the color filter elements, is generated by each of the photodiodes. For example, an R pixel signal is generated by a photodiode corresponding to an R color filter element.
A pixel signal may be subjected to an interpolating process so that a color image having a higher quality is obtained, in comparison with the case in which a pixel signal output from the imaging device is used just as it is. In a usual interpolating process, regarding an objective pixel from which an R-signal is obtained by a photodiode, a G-signal is generated by taking an average of the G-signals of pixels positioned around the objective pixel, and a B-signal is generated by taking an average of the B-signals of pixels positioned around the objective pixel. However, for example, in an image in which spatial frequency is high, the actual color of the objective pixel, for which a color is to be obtained by interpolation, may be largely different from the actual colors of the pixels around the objective pixel. In such a case, chromatic blur occurs because of the color signal of the pixel obtained by interpolation.
Therefore, an object of the present invention is to reduce the chromatic blur which occurs in a reproduced image because of the interpolating process.
According to the present invention, there is provided an image interpolating device comprising a color filter, an imaging device, a pattern-setting processor, a first G-interpolation processor, a second G-interpolation processor, an R/B-interpolation processor, a B-interpolation processor, and an R-interpolation processor.
The color filter has a first row, in which red(R) and green(G) color filter elements are alternately aligned in the horizontal direction, and a second row, in which G and blue(B) color filter elements are alternately aligned in the horizontal direction. The second row is adjacent to the upper or lower side of the first row. The imaging device generates first R, G, and B-signals which are pixel signals corresponding to the color filter elements. The pattern-setting processor extracts images belonging to a first pattern, in which a pixel having the first R-signal is positioned at the upper-left corner of a 2xc3x972 pixel matrix, a second pattern, in which a pixel having the first G-signal is positioned at the upper-right corner of the 2xc3x972 pixel matrix, a third pattern, in which a pixel having the first G-signal is positioned at the lower-left corner of the 2xc3x972 pixel matrix, and a fourth pattern, in which a pixel having the first B-signal is positioned at the lower-right corner of the 2xc3x972 pixel matrix, from the first R, G, and B-signals generated by the imaging device. The first G-interpolation processor, regarding a first objective pixel contained in the images belonging to the first pattern, obtains a first interpolated G-signal based on a first difference signal, which is a difference between the first G-signals of pixels offset from the first objective pixel in the right and left directions or the upper and lower directions by one pixel, second difference signals, each of which is a difference between the first R-signal of the first objective pixel and the first R-signal of a pixel offset from the first objective pixel in the right, left, upper, or lower direction by two pixels, third difference signals, each of which is a difference between the first R-signal of the first objective pixel and the first G-signal of a pixel offset from the first objective pixel in the right, left, upper, or lower direction by one pixel. The second G-interpolation processor, regarding a fourth objective pixel contained in the images belonging to the fourth pattern, obtains a second interpolated G-signal based on a fourth difference signal, which is a difference between the first G-signals of pixels offset from the fourth objective pixel in the right and left directions or the upper and lower directions by one pixel, fifth difference signals, each of which is a difference between the first B-signal of the fourth objective pixel and the first B-signal of a pixel offset from the fourth objective pixel in the right, left, upper, or lower direction by two pixels, sixth difference signals, each of which is a difference between the first B-signal of the fourth objective pixel and the first G-signal of a pixel offset from the fourth objective pixel in the right, left, upper, or lower direction by one pixel. The R/B-interpolation processor, regarding second and third objective pixels contained in the images belonging to the second and third patterns, obtains second R and B-signals by utilizing the first R and B-signals of pixels adjacent to the second and third objective pixels. The B-interpolation processor extracts a first similar pixel which has the closest luminance value to that of the first objective pixel, from pixels adjacent to the first objective pixel, and obtains a third B-signal based on a pixel of the first similar pixel. The R-interpolation processor extracts a second similar pixel which has the closest luminance value to that of the fourth objective pixel, from pixels adjacent to the fourth objective pixel, and obtains a third R-signal based on a pixel signal of the second similar pixel.